// UI Renderer - Simple 2D UI rendering
#pragma once
#include <d3d9.h>
#include <d3dx9.h>

class UIRenderer
{
public:
    UIRenderer();
    ~UIRenderer();

    bool Initialize(LPDIRECT3DDEVICE9 device, int screenWidth, int screenHeight);
    void Cleanup();

    // Render crosshair at screen center
    void RenderCrosshair(LPDIRECT3DDEVICE9 device);

    // Render health bar
    void RenderHealthBar(LPDIRECT3DDEVICE9 device, float currentHealth, float maxHealth, float x, float y, float width, float height);

    // Render damage indicator (red screen edges)
    void RenderDamageIndicator(LPDIRECT3DDEVICE9 device, float intensity);

private:
    void DrawLine(LPDIRECT3DDEVICE9 device, float x1, float y1, float x2, float y2, D3DCOLOR color);
    void DrawRect(LPDIRECT3DDEVICE9 device, float x, float y, float width, float height, D3DCOLOR color, bool filled);

    int m_screenWidth;
    int m_screenHeight;
    ID3DXLine* m_pLine;
    ID3DXSprite* m_pSprite;
};
